<?php

namespace aerovuelos\ReservaBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class ReservasType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('precioTotal')
            ->add('personas')
            ->add('usuarios')
            ->add('vuelos')
        ;
        $builder->add('vuelos', new \aerovuelos\VueloBundle\Form\VuelosType);
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'aerovuelos\ReservaBundle\Entity\Reservas',
            'cascade_validation' => true,
        ));
    }

    public function getName()
    {
        return 'aerovuelos_reservabundle_reservastype';
    }
}
